$(document).ready(function () {
  // 头图适应
  $(window).resize(function () {
    var windowWidth = $(window).width();
    if(windowWidth > 768) {
      $(".information-aside-img").html('').css({'background':'url("../images/information/information_aside1920.jpg") no-repeat center','height': '450'});
    }else {
      $(".information-aside-img").html('<img src="../images/information/information_aside768.jpg">').css({'background':'none','height': 'auto'});
    }
  }).trigger("resize");
  // 列表转详情
  $('.information-main-list > li').find('.media').on('click', function () {
    location.href = './information-details.html';
  });
  // hash判断
  var tabContent = $('.tab-content').find('.tab-pane');
  var tabList = $('[role=tablist]').find('li');
  tabList.removeClass('active');
  tabContent.removeClass('active');
  if(location.hash === '#1') {
    tabList.eq(1).addClass('active');
    tabContent.eq(1).addClass('active');
  }else if(location.hash === '#2') {
    tabList.eq(2).addClass('active');
    tabContent.eq(2).addClass('active');
  }else {
    tabList.eq(0).addClass('active');
    tabContent.eq(0).addClass('active');
  }
});